<template>
  <div id="distributionOrder">
    <DistributionOrderItem
            :master="master"
            :orderid="orderid"
            v-for="(master,i) in list"
            :isLastItem="i == (list.length - 1)"
    >

    </DistributionOrderItem>

  </div>
</template>

<script>
import DistributionOrderItem from "./components/DistributionOrderItem";
import {api_userMaster} from "@/service/api/user"
export default {
  name: "DistributionOrder",
  components: {
    DistributionOrderItem
  },
    data() {
        return {
            orderid: this.$route.query.orderid,
            list: [],
        };
    },
    methods:{
        requestData(){
            console.log(this.list);

            api_userMaster().then((res)=>{
                var dataList = res.data;
                for (var i = 0; i < dataList.length; i++) {
                    this.list.push(dataList[i]);
                }
                console.log(this.list);
            }).catch((error)=>{

            })
        }
    },
    created() {
        this.requestData();
    },
};
</script>

<style scoped>
#distributionOrder {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  overflow: auto;
  background-color: #f6f8fb;
}
</style>
